<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" deferredSyntaxAllowedAsLiteral="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ECSHOP 管理中心 - 添加新商品 </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/Styles/general.css" rel="stylesheet" type="text/css" />
<link href="/Styles/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<s:debug></s:debug>
<h1>
    <span class="action-span"><a href="/product/list">商品列表</a>
    </span>
    <span class="action-span1"><a href="__GROUP__">ECSHOP 管理中心</a></span>
    <span id="search_id" class="action-span1"> - 添加新商品 </span>
    <div style="clear:both"></div>
</h1>

<div class="tab-div">
    <div id="tabbar-div">
        <p>
            <span class="tab-front" id="general-tab">通用信息</span>
        </p>
    </div>
    <div id="tabbody-div">
        <s:form enctype="multipart/form-data"  action="product_save" method="post" namespace="/system">
            <table width="90%" id="general-table" align="center">
            	<tr>
                    <td><s:hidden name="product.id"  />
                    <s:hidden name="product.bigPic" />
					<s:hidden name="product.smallPic" />
					<s:hidden name="product.viewTimes"/>
					<s:hidden name="product.inputTime"/>
                </tr>
                <tr>
                    <td class="label">商品名称：</td>
                    <td><s:textfield name="product.name" />
						<span class="require-field">
                        	<s:property value="fieldErrors['productName'][0]"/>
                        </span></td>
                </tr>
                <tr>
                    <td class="label">商品货号： </td>
                    <td>
                        <s:textfield name="product.sn" />
                        <span id="goods_sn_notice"></span><br />
                        <span class="notice-span"id="noticeGoodsSN">如果您不输入商品货号，系统将自动生成一个唯一的货号。</span>
                    </td>
                </tr>
                <tr>
                    <td class="label">商品分类：</td>
                    <td>
                        <s:select list="#dirList" name="product.dir.id" listKey="id" listValue="name"></s:select>
                        <span class="require-field">*</span>
                    </td>
                </tr>
                <tr>
                    <td class="label">成本价：</td>
                    <td>
                        <s:textfield name="product.costPrice" />
                        <span class="require-field">
							<s:property value="fieldErrors['product.costPrice'][0]"/>
						</span>
                        
                    </td>
                </tr>
                 <tr>
                    <td class="label">市场价：</td>
                    <td>
                        <s:textfield name="product.marketPrice" />
                        <span class="require-field">
							<s:property value="fieldErrors['product.marketPrice'][0]"/>
						</span>
                    </td>
                </tr>
                 <tr>
                    <td class="label">售价：</td>
                    <td>
                        <s:textfield name="product.salePrice" />
                        <span class="require-field">
                        	<s:property value="fieldErrors['product.salePrice'][0]"/>
                        </span>
                    </td>
                </tr>
                
                <tr>
                    <td class="label">产地：</td>
                    <td>
                        <s:textfield name="product.place" />
                    </td>
                </tr>
                <tr>
                    <td class="label">规格：</td>
                    <td>
                        <s:textfield name="product.model" />
                    </td>
                </tr>
                <tr>
                    <td class="label">库存：</td>
                    <td>
                        <s:textfield name="product.num" />
                        <span class="require-field">
                        	<s:property value="fieldErrors['product.num'][0]"/>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td class="label">是否上架：</td>
                    <td>
                        <s:radio name="product.status" list="#{'0':'上架','1':'不上架'}"></s:radio>
                    </td>
                </tr>
                <tr>
                    <td class="label">是否推荐：</td>
                    <td>
                        <s:radio name="product.recommended" list="#{'true':'推荐','false':'不推荐'}"></s:radio>
                    </td>
                </tr>
                <tr>
                	<td class="label">上传图片：</td>
                	<td>
                		<s:file name="proImg" accept="image/*" />
                	</td>
                </tr>
                <tr>
                    <td class="label">商品简单描述：</td>
                    <td>
                        <s:textfield name="product.intro" />
                    </td>
                </tr>
            </table>
            <div class="button-div">
                <input type="submit" value=" 确定 " class="button"/>
                <input type="reset" value=" 重置 " class="button" />
            </div>
        </s:form>
    </div>
</div>
</html>